<p>demo-ws works!</p>
<!-- <form nz-form [nzAutoTips]="autoTips" [nzLayout]="'horizontal'" [formGroup]="validateForm" (ngSubmit)="submitForm()"> -->
<form nz-form [formGroup]="validateForm" (ngSubmit)="submitForm()">
  <nz-form-item>
    <nz-form-label [nzSpan]="7" nzRequired>姓名</nz-form-label>
    <nz-form-control [nzSpan]="12">
      <input nz-input placeholder="请输入" formControlName="name" />
    </nz-form-control>
  </nz-form-item>
  <nz-form-item>
    <nz-form-label [nzSpan]="7">性别</nz-form-label>
    <nz-form-control [nzSpan]="12">
      <!-- <nz-select [ngModel]="lucy" nzAllowClear nzPlaceHolder="请选择"> -->
      <nz-select nzAllowClear nzPlaceHolder="请选择" formControlName="sex">
        <nz-option nzValue="1" nzLabel="男"></nz-option>
        <nz-option nzValue="0" nzLabel="女"></nz-option>
      </nz-select>
    </nz-form-control>
  </nz-form-item>
  <nz-form-item>
    <nz-form-label [nzSpan]="7">年龄</nz-form-label>
    <nz-form-control [nzSpan]="12">
      <input nz-input placeholder="请输入" formControlName="age" type="number" />
      <!-- <nz-input-number style="width: 100%;" [nzMin]="1" [nzMax]="180" placeholder="请输入"
        formControlName="age"></nz-input-number> -->
    </nz-form-control>
  </nz-form-item>
  <nz-form-item>
    <nz-form-label [nzSpan]="7">科室</nz-form-label>
    <nz-form-control [nzSpan]="12">
      <input nz-input placeholder="请输入" formControlName="departmentId" />
    </nz-form-control>
  </nz-form-item>
  <nz-form-item>
    <nz-form-label [nzSpan]="7">超声号</nz-form-label>
    <nz-form-control [nzSpan]="12">
      <input nz-input placeholder="请输入" formControlName="ultrasoundNumber" />
    </nz-form-control>
  </nz-form-item>
  <nz-form-item>
    <nz-form-label [nzSpan]="7">检查部位</nz-form-label>
    <nz-form-control [nzSpan]="12">
      <input nz-input placeholder="请输入" formControlName="jcbw" />
    </nz-form-control>
  </nz-form-item>
  <nz-form-item>
    <nz-form-label [nzSpan]="7">初复诊</nz-form-label>
    <nz-form-control [nzSpan]="12">
      <nz-select nzAllowClear nzPlaceHolder="请选择" formControlName="cfz">
        <nz-option nzValue="0" nzLabel="初诊"></nz-option>
        <nz-option nzValue="1" nzLabel="复诊"></nz-option>
      </nz-select>
    </nz-form-control>
  </nz-form-item>
  <nz-form-item>
    <nz-form-label [nzSpan]="7">日期</nz-form-label>
    <nz-form-control [nzSpan]="12">
      <nz-date-picker style="width: 100%;" nzShowTime formControlName="datePickerTime"></nz-date-picker>
    </nz-form-control>
  </nz-form-item>
  <nz-form-item>
    <nz-form-control [nzOffset]="7" [nzSpan]="12">
      <!-- <button nz-button nzType="primary" [disabled]="!validateForm.valid">Submit</button> -->
      <button nz-button nzType="primary">提交</button>
      <button style="margin-left: 12px;" nz-button (click)="resetForm($event)"
        [disabled]="!validateForm.valid">重置</button>
    </nz-form-control>
  </nz-form-item>
</form>
<section class="tboxs" style="padding: 30px;">

  <!-- <button nz-button (click)="addRow()" nzType="primary">Add</button> -->
  <button nz-button nzType="primary" (click)="showModal()">
    <span>新建病例</span>
  </button>
  <nz-modal [(nzVisible)]="isVisible" nzTitle="新建病例" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()"
    [nzOkLoading]="isOkLoading">
    <div *nzModalContent>

    </div>
  </nz-modal>
  <br />
  <br />
  <nz-table #editRowTable nzBordered nzTitle="医生端 2024.3.25@ye9060" [nzData]="listOfData">
    <thead>
      <tr>
        <th nzWidth="30%">Name</th>
        <th>Age</th>
        <th>Address</th>
        <th>Action</th>
      </tr>
    </thead>
    <tbody>
      <tr *ngFor="let data of editRowTable.data" class="editable-row">
        <td>
          <div class="editable-cell" [hidden]="editId === data.id" (click)="startEdit(data.id)">
            {{ data.name }}
          </div>
          <input [hidden]="editId !== data.id" type="text" nz-input [(ngModel)]="data.name" (blur)="stopEdit()" />
        </td>
        <td>{{ data.age }}</td>
        <td>{{ data.address }}</td>
        <td>
          <a nz-popconfirm nzPopconfirmTitle="Sure to delete?" (nzOnConfirm)="deleteRow(data.id)">Delete</a>
        </td>
      </tr>
    </tbody>
  </nz-table>
</section>